package com.cooliang.ui.base;

import com.cooliang.util.ColorUtil;

import javax.swing.*;
import java.awt.*;
import java.awt.geom.RoundRectangle2D;


public class CButton extends JButton {

    public CButtonType type;
    private String buttonName;

    public enum CButtonType {
        SURE, CANCEL;
    }

    public CButton(String text, CButtonType type) {
        super(text);
        this.type = type;

        this.setFont(ColorUtil.text_font14);

        if (type == CButtonType.SURE) {
            this.setForeground(ColorUtil.common_blue_color);
        } else if (type == CButtonType.CANCEL) {
            this.setForeground(ColorUtil.common_gray_color);
        }
    }

    public String getButtonName() {
        return buttonName;
    }

    public void setButtonName(String buttonName) {
        this.buttonName = buttonName;
    }
}
